﻿@if(!Request.IsAuthenticated) {
    Response.Redirect("~/");
}

@model fix.Models.fx_doc

@{
    ViewBag.Title = "Создать";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Добавить</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Create", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend></legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.name)
        </div>
        <div class="editor-field">
            <input type="file" name="f" id="file" size=50/>
            @Html.ValidationMessageFor(model => model.name)
        </div>        

        <p>
            <input type="submit" value="Создать" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Назад", "Index")
</div>
